fix Qt6 deprecation warning in mapbar_track. (#703)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 15 Mar 2021 13:04:10 +0000 (07:04 -0600)
committerGitHub <noreply@github.com>
Mon, 15 Mar 2021 13:04:10 +0000 (07:04 -0600)
commit2711b46ff73c211f4c9a7d6a863d1dced1eef506
treeee63bb6e27b14399f80d20ce8c5ad79fcbc7d9b9
parent58f46272204c9af68aa875160c4b8601ffd5133e
fix Qt6 deprecation warning in mapbar_track. (#703)

* fix Qt6 deprecation warning in mapbar_track.

"warning: 'fromUtf16' is deprecated: Use char16_t* overload."
However, it is recommended to use QString(const QChar *, int) or
QString(const QChar *) instead of
QString::fromUtf16(const ushort *unicode, int size = -1) and
QString::fromUtf16(const char16_t *str, int size = -1) anyway.

* fix Either the condition 'track==nullptr' is redundant or there is possible null pointer dereference.

as this isn't using a non-throwing allocation function memory allocation
errors will cause std::bad_alloc to be thrown anyway, we won't return
with track == nullptr.

* eliminate another non-functional memory check.
f90g_track.cc
mapbar_track.cc